<template>
  <div class="btns">
    <div class="btn btn1">
      <a href="#">btn1</a>
    </div>
    <div class="btn btn2">
      <a href="#">btn2</a>
    </div>
  </div>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped>
.btns {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  column-gap: 40px;
  background-color: rgba(205, 102, 132, 0.4);
}
.btn {
  $btn-size: 60px;
  width: calc(#{$btn-size} * 3);
  height: $btn-size;
  position: relative;
  overflow: hidden;
  border-radius: $btn-size;
  z-index: 0;
  background-color: rgba(205, 102, 132, 0.6);
  // backdrop-filter: blur(40px);
  &::after,
  &::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20%;
    z-index: -1;
    transition-delay: 0.5s;
    transition-duration: 1s;
  }
  &::before {
    top: 0;
    background-color: blue;
  }
  &::after {
    bottom: 0;
    background-color: red;
  }
  &:hover {
    &::before,
    &::after {
      height: 50%;
      width: 100%;
    }
  }
  a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
    width: 100%;
    color: #000;
    z-index: 0;
    // background-color: rgba(205, 102, 132, 0.9);
    backdrop-filter: blur(10px);
    // background-color: transparent;
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 50%;
      height: 100%;
      z-index: -1;
      // background-color: rgba(205, 102, 132, 0.6);
      background: linear-gradient(
        to right,
        rgba(217, 114, 128, 0.5),
        rgba(217, 114, 128, 0.7),
        rgba(255, 255, 255, 1)
      );
      transform: skewX(45deg);
      transition: 0.5s;
    }
    &:hover::after {
      width: 100%;
    }
  }
}
</style>
